package web.form;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;

public class Link {
	private String label;
	private String type;
	private List<LinkField> fields;
	
	@SuppressWarnings("unchecked")
	public Link() {
		fields =  LazyList.decorate(new ArrayList<LinkField>(), 
				FactoryUtils.instantiateFactory(LinkField.class));
	}
	
	public Link(String label, String type, List<LinkField> fields) {
		this.label = label;
		this.type = type;
		this.fields = fields;
	}
	
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public List<LinkField> getFields() {
		return fields;
	}
	public void setFields(List<LinkField> fields) {
		this.fields = fields;
	}
	
	
}
